package dormatory;

import java.util.List;

public class DormitoryServiceImpl implements DormitoryService {

	private DormitoryRepository dormitoryRepository;
	
	public DormitoryServiceImpl(DormitoryRepository dormitoryRepository) {
		this.dormitoryRepository = dormitoryRepository;
	}
	
	public Dormitory getDorm(String name) {
		return dormitoryRepository.getDorm(name);
	}

	public List<Dormitory> getDormList() {
		return dormitoryRepository.getDormList();
	}

	public void save(Dormitory dorm) {
		dormitoryRepository.save(dorm);
	}
	
}
